package es.usj.tac.meteorologica.dto;

import java.io.Serializable;

/**
 * Clase de almacenamiento de datos de un objeto Weather
 * 
 *
 */
public class Weather implements Serializable {

    private int id;
    private String location;
    private String time;
    private String visibility;
   
    private int temperatureInF;
    private int temperatureInC;
    private int dewPointInF;
    private int dewPointInC;
    private double relativeHumidity;
    private String pressure;
    private boolean status;
    private int city;
    private String wind;
    
    public Weather() {
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public String getVisibility() {
        return visibility;
    }

    public void setVisibility(String visibility) {
        this.visibility = visibility;
    }

   

    public int getTemperatureInF() {
        return temperatureInF;
    }

    public void setTemperatureInF(int temperatureInF) {
        this.temperatureInF = temperatureInF;
    }

    public int getTemperatureInC() {
        return temperatureInC;
    }

    public void setTemperatureInC(int temperatureInC) {
        this.temperatureInC = temperatureInC;
    }

    public int getDewPointInF() {
        return dewPointInF;
    }

    public void setDewPointInF(int dewPointInF) {
        this.dewPointInF = dewPointInF;
    }

    public int getDewPointInC() {
        return dewPointInC;
    }

    public void setDewPointInC(int dewPointInC) {
        this.dewPointInC = dewPointInC;
    }

    public double getRelativeHumidity() {
        return relativeHumidity;
    }

    public void setRelativeHumidity(double relativeHumidity) {
        this.relativeHumidity = relativeHumidity;
    }

    public String getPressure() {
        return pressure;
    }

    public void setPressure(String pressure) {
        this.pressure = pressure;
    }

    public boolean getStatus() {
        return status;
    }

    public void setStatus(boolean status) {
        this.status = status;
    }

    public int getCity() {
        return city;
    }

    public void setCity(int city) {
        this.city = city;
    }

    public boolean equals(Object inObject) {
        if(inObject == null) return false;

        if(!(inObject instanceof Weather)) return false;

        Weather obj = (Weather) inObject;
        if(id != obj.id)
            return false;
        if(!location.equals(obj.location))
            return false;
        if(!time.equals(obj.time))
            return false;
        if(!visibility.equals(obj.visibility))
            return false;
        if(temperatureInF != obj.temperatureInF)
            return false;
        if(temperatureInC != obj.temperatureInC)
            return false;
        if(dewPointInF != obj.dewPointInF)
            return false;
        if(dewPointInC != obj.dewPointInC)
            return false;
        if(relativeHumidity != obj.relativeHumidity)
            return false;
        if(!pressure.equals(obj.pressure))
            return false;
        if(status != obj.status)
            return false;
        return true;
    }

    public String toString() {
        StringBuffer sb = new StringBuffer("Weather::");
        sb.append("id=");
        sb.append(id);
        sb.append(";location=");
        sb.append(location);
        sb.append(";time=");
        sb.append(time);
        sb.append(";visibility=");
        sb.append(visibility);
       
        sb.append(";temperatureInF=");
        sb.append(temperatureInF);
        sb.append(";temperatureInC=");
        sb.append(temperatureInC);
        sb.append(";dewPointInF=");
        sb.append(dewPointInF);
        sb.append(";dewPointInC=");
        sb.append(dewPointInC);
        sb.append(";relativeHumidity=");
        sb.append(relativeHumidity);
        sb.append(";pressure=");
        sb.append(pressure);
        sb.append(";status=");
        sb.append(status);
        return sb.toString();
    }

	/**
	 * @return the wind
	 */
	public String getWind() {
		return wind;
	}

	/**
	 * @param wind the wind to set
	 */
	public void setWind(String wind) {
		this.wind = wind;
	}

}
